// 操作设置
export default {
  props: {
    value: Array,
    row: Object,
    options: Object
  },
  render(h) {
    return h(
      'div',
      this.value.map(item => {
        var _opt = Object.assign(
          {},
          {
            size: 'mini',
            type: item.type || 'text'
          },
          this.options
        )
        var label = item.label
        if (_opt.type === 'icon') {
          _opt.icon = label.toLowerCase()
          label = ''
        }
        return h(
          'el-button',
          {
            props: _opt,
            on: {
              click: () => {
                this.$emit('click', item.emitName)
              }
            }
          },
          [label]
        )
      })
    )
  }
}
